//
//  StatusForwardCell.swift
//  weibo117
//
//  Created by 宋禹奇 on 15/7/8.
//  Copyright © 2015年 宋禹奇. All rights reserved.
//

import UIKit
import FFAutoLayout

class StatusForwardCell: StatusCell {

    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        //转发微博文字
        forwardLabel = UILabel(color: UIColor.darkGrayColor(), fontSize: 14, mutiLines: true)
        //forwardLabel!.text = "转发微博,转发微博都发来撒;就快了;速度感觉饿哦分;i;就覅而哦该何荣;过节费哦好如果i"
        insertSubview(forwardLabel!, atIndex: 0)
        
        forwardLabel!.preferredMaxLayoutWidth = UIScreen.mainScreen().bounds.width - 8
        
        //转发微博按钮
        forwarkButton.backgroundColor = UIColor(white: 0.95, alpha: 1.0)
        insertSubview(forwarkButton, atIndex: 0)
        

        // 自动布局
        // 背景按钮
        forwarkButton.ff_AlignVertical(ff_AlignType.BottomLeft, referView: contentLabel, size: nil, offset: CGPoint(x: -12, y: 12))
        forwarkButton.ff_AlignVertical(ff_AlignType.TopRight, referView: footerView, size: nil)
        // 转发文字
        forwardLabel!.ff_AlignInner(ff_AlignType.TopLeft, referView: forwarkButton, size: nil, offset: CGPoint(x: 12, y: 12))
        
        // 配图视图
        recordPictureViewCons(pictureView.ff_AlignVertical(ff_AlignType.BottomLeft, referView: forwardLabel!, size: CGSizeMake(290, 90), offset: CGPoint(x: 0, y: 12)))
      
    }

    required init(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
    //懒加载控    
    lazy var forwarkButton = UIButton()
}
